using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._UtilityNetworkTools._Administration
{
    /// <summary>
    /// <para>Set Association Role</para>
    /// <para>Alters the association role assigned to a network feature class or table  at the asset type level.</para>
    /// <para>在资产类型级别更改分配给网络要素类或表的关联角色。</para>
    /// </summary>    
    [DisplayName("Set Association Role")]
    public class SetAssociationRole : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public SetAssociationRole()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_utility_network">
        /// <para>Input Utility Network</para>
        /// <para>The utility network that contains the asset type with an association role to set.</para>
        /// <para>包含要设置的关联角色的资产类型的公共设施网络。</para>
        /// </param>
        /// <param name="_domain_network">
        /// <para>Domain Network</para>
        /// <para>The domain network that contains the asset type with an association role to set.</para>
        /// <para>包含要设置的关联角色的资产类型的域网络。</para>
        /// </param>
        /// <param name="_featureclass">
        /// <para>Input Table</para>
        /// <para>The utility network feature class or table where the association role will be set.</para>
        /// <para>将在其中设置关联角色的公共设施网络要素类或表。</para>
        /// </param>
        /// <param name="_assetgroup">
        /// <para>Asset Group</para>
        /// <para>The asset group that contains the asset type.</para>
        /// <para>包含资产类型的资产组。</para>
        /// </param>
        /// <param name="_assettype">
        /// <para>Asset Type</para>
        /// <para>The asset type that the association role will be set for.</para>
        /// <para>将为其设置关联角色的资产类型。</para>
        /// </param>
        /// <param name="_association_role_type">
        /// <para>Role Type</para>
        /// <para><xdoc>
        ///   <para>Specifies the type of association role to assign to the asset type.</para>
        ///   <bulletList>
        ///     <bullet_item>Container—Features or objects of this asset type can contain other features and objects as content.</bullet_item><para/>
        ///     <bullet_item>Structure—Features or objects of this asset type can have other features and objects attached to them.</bullet_item><para/>
        ///     <bullet_item>None—No role type will be assigned. These are features or objects that are neither a container nor a structure but do connect to other structures.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定要分配给资产类型的关联角色的类型。</para>
        ///   <bulletList>
        ///     <bullet_item>容器 - 此资产类型的要素或对象可以包含其他要素和对象作为内容。</bullet_item><para/>
        ///     <bullet_item>结构 - 此资产类型的要素或对象可以附加其他要素和对象。</bullet_item><para/>
        ///     <bullet_item>无 - 不会分配任何角色类型。这些功能或对象既不是容器也不是结构，而是连接到其他结构。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// </param>
        /// <param name="_association_deletion_semantics">
        /// <para>Deletion Semantics</para>
        /// <para><xdoc>
        ///   <para>Specifies the deletion semantics for the features, which is how child features will be handled when the parent feature is deleted. This applies to both container and structure association roles.</para>
        ///   <bulletList>
        ///     <bullet_item>Cascade—When the parent container or structure is deleted, all content or attachment network features will be deleted.</bullet_item><para/>
        ///     <bullet_item>Set to none— When a container or structure is deleted, its content or attachment features and objects will not be deleted. Instead, it will be removed from the containment or structural attachment association.</bullet_item><para/>
        ///     <bullet_item>Restricted— If content or attachment features or objects exist, an error will be returned when attempting to delete the container or structure. The content or attachment features and objects must be removed before deleting the container or structure.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定要素的删除语义，即删除父要素时如何处理子要素。这适用于容器和结构关联角色。</para>
        ///   <bulletList>
        ///     <bullet_item>级联 - 删除父容器或结构后，将删除所有内容或附件网络要素。</bullet_item><para/>
        ///     <bullet_item>设置为无 - 删除容器或结构时，不会删除其内容或附件要素和对象。相反，它将从容器或结构附件关联中删除。</bullet_item><para/>
        ///     <bullet_item>受限 - 如果存在内容或附件要素或对象，则在尝试删除容器或结构时将返回错误。在删除容器或结构之前，必须移除内容或附件要素和对象。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// </param>
        public SetAssociationRole(object _in_utility_network, object _domain_network, object _featureclass, object _assetgroup, object _assettype, _association_role_type_value? _association_role_type, _association_deletion_semantics_value? _association_deletion_semantics)
        {
            this._in_utility_network = _in_utility_network;
            this._domain_network = _domain_network;
            this._featureclass = _featureclass;
            this._assetgroup = _assetgroup;
            this._assettype = _assettype;
            this._association_role_type = _association_role_type;
            this._association_deletion_semantics = _association_deletion_semantics;
        }
        public override string ToolboxName => "Utility Network Tools";

        public override string ToolName => "Set Association Role";

        public override string CallName => "un.SetAssociationRole";

        public override List<string> AcceptEnvironments => [];

        public override object[] ParameterInfo => [_in_utility_network, _domain_network, _featureclass, _assetgroup, _assettype, _association_role_type.GetGPValue(), _association_deletion_semantics.GetGPValue(), _view_scale, _split_content.GetGPValue(), _out_utility_network];

        /// <summary>
        /// <para>Input Utility Network</para>
        /// <para>The utility network that contains the asset type with an association role to set.</para>
        /// <para>包含要设置的关联角色的资产类型的公共设施网络。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Utility Network")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_utility_network { get; set; }


        /// <summary>
        /// <para>Domain Network</para>
        /// <para>The domain network that contains the asset type with an association role to set.</para>
        /// <para>包含要设置的关联角色的资产类型的域网络。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Domain Network")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _domain_network { get; set; }


        /// <summary>
        /// <para>Input Table</para>
        /// <para>The utility network feature class or table where the association role will be set.</para>
        /// <para>将在其中设置关联角色的公共设施网络要素类或表。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Table")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _featureclass { get; set; }


        /// <summary>
        /// <para>Asset Group</para>
        /// <para>The asset group that contains the asset type.</para>
        /// <para>包含资产类型的资产组。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Asset Group")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _assetgroup { get; set; }


        /// <summary>
        /// <para>Asset Type</para>
        /// <para>The asset type that the association role will be set for.</para>
        /// <para>将为其设置关联角色的资产类型。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Asset Type")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _assettype { get; set; }


        /// <summary>
        /// <para>Role Type</para>
        /// <para><xdoc>
        ///   <para>Specifies the type of association role to assign to the asset type.</para>
        ///   <bulletList>
        ///     <bullet_item>Container—Features or objects of this asset type can contain other features and objects as content.</bullet_item><para/>
        ///     <bullet_item>Structure—Features or objects of this asset type can have other features and objects attached to them.</bullet_item><para/>
        ///     <bullet_item>None—No role type will be assigned. These are features or objects that are neither a container nor a structure but do connect to other structures.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定要分配给资产类型的关联角色的类型。</para>
        ///   <bulletList>
        ///     <bullet_item>容器 - 此资产类型的要素或对象可以包含其他要素和对象作为内容。</bullet_item><para/>
        ///     <bullet_item>结构 - 此资产类型的要素或对象可以附加其他要素和对象。</bullet_item><para/>
        ///     <bullet_item>无 - 不会分配任何角色类型。这些功能或对象既不是容器也不是结构，而是连接到其他结构。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Role Type")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public _association_role_type_value? _association_role_type { get; set; }

        public enum _association_role_type_value
        {
            /// <summary>
            /// <para>None</para>
            /// <para>None—No role type will be assigned. These are features or objects that are neither a container nor a structure but do connect to other structures.</para>
            /// <para>无 - 不会分配任何角色类型。这些功能或对象既不是容器也不是结构，而是连接到其他结构。</para>
            /// </summary>
            [Description("None")]
            [GPEnumValue("NONE")]
            _NONE,

            /// <summary>
            /// <para>Container</para>
            /// <para>Container—Features or objects of this asset type can contain other features and objects as content.</para>
            /// <para>容器 - 此资产类型的要素或对象可以包含其他要素和对象作为内容。</para>
            /// </summary>
            [Description("Container")]
            [GPEnumValue("CONTAINER")]
            _CONTAINER,

            /// <summary>
            /// <para>Structure</para>
            /// <para>Structure—Features or objects of this asset type can have other features and objects attached to them.</para>
            /// <para>结构 - 此资产类型的要素或对象可以附加其他要素和对象。</para>
            /// </summary>
            [Description("Structure")]
            [GPEnumValue("STRUCTURE")]
            _STRUCTURE,

        }

        /// <summary>
        /// <para>Deletion Semantics</para>
        /// <para><xdoc>
        ///   <para>Specifies the deletion semantics for the features, which is how child features will be handled when the parent feature is deleted. This applies to both container and structure association roles.</para>
        ///   <bulletList>
        ///     <bullet_item>Cascade—When the parent container or structure is deleted, all content or attachment network features will be deleted.</bullet_item><para/>
        ///     <bullet_item>Set to none— When a container or structure is deleted, its content or attachment features and objects will not be deleted. Instead, it will be removed from the containment or structural attachment association.</bullet_item><para/>
        ///     <bullet_item>Restricted— If content or attachment features or objects exist, an error will be returned when attempting to delete the container or structure. The content or attachment features and objects must be removed before deleting the container or structure.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定要素的删除语义，即删除父要素时如何处理子要素。这适用于容器和结构关联角色。</para>
        ///   <bulletList>
        ///     <bullet_item>级联 - 删除父容器或结构后，将删除所有内容或附件网络要素。</bullet_item><para/>
        ///     <bullet_item>设置为无 - 删除容器或结构时，不会删除其内容或附件要素和对象。相反，它将从容器或结构附件关联中删除。</bullet_item><para/>
        ///     <bullet_item>受限 - 如果存在内容或附件要素或对象，则在尝试删除容器或结构时将返回错误。在删除容器或结构之前，必须移除内容或附件要素和对象。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Deletion Semantics")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public _association_deletion_semantics_value? _association_deletion_semantics { get; set; }

        public enum _association_deletion_semantics_value
        {
            /// <summary>
            /// <para>Cascade</para>
            /// <para>Cascade—When the parent container or structure is deleted, all content or attachment network features will be deleted.</para>
            /// <para>级联 - 删除父容器或结构后，将删除所有内容或附件网络要素。</para>
            /// </summary>
            [Description("Cascade")]
            [GPEnumValue("CASCADE")]
            _CASCADE,

            /// <summary>
            /// <para>Set to none</para>
            /// <para>Set to none— When a container or structure is deleted, its content or attachment features and objects will not be deleted. Instead, it will be removed from the containment or structural attachment association.</para>
            /// <para>设置为无 - 删除容器或结构时，不会删除其内容或附件要素和对象。相反，它将从容器或结构附件关联中删除。</para>
            /// </summary>
            [Description("Set to none")]
            [GPEnumValue("SET_TO_NONE")]
            _SET_TO_NONE,

            /// <summary>
            /// <para>Restricted</para>
            /// <para>Restricted— If content or attachment features or objects exist, an error will be returned when attempting to delete the container or structure. The content or attachment features and objects must be removed before deleting the container or structure.</para>
            /// <para>受限 - 如果存在内容或附件要素或对象，则在尝试删除容器或结构时将返回错误。在删除容器或结构之前，必须移除内容或附件要素和对象。</para>
            /// </summary>
            [Description("Restricted")]
            [GPEnumValue("RESTRICTED")]
            _RESTRICTED,

        }

        /// <summary>
        /// <para>View Scale</para>
        /// <para>The scale at which containment mode will be entered to edit features participating in the container. For example, setting the view scale to 5 means that when you enter containment mode of the container feature, the scale will be 1:5. Units are based on the utility network units, which are located on the Source tab of the utility network layer properties pane. This property does not apply to junction and edge objects.</para>
        /// <para>进入包含模式以编辑参与容器的要素的比例。例如，将视图比例设置为 5 表示当您进入容器要素的包含模式时，比例将为 1：5。单位基于公共设施网络单位，这些单位位于公共设施网络图层属性窗格的源选项卡上。此属性不适用于交汇点对象和边对象。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("View Scale")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public double? _view_scale { get; set; } = null;


        /// <summary>
        /// <para>Split Content</para>
        /// <para><xdoc>
        ///   <para>Specifies whether the associated content of a container will be split if the container feature is split. This parameter is only available if the association role is container and is only applicable for line features.
        ///   <bulletList>
        ///     <bullet_item>Checked—he container's content will be split if the container feature is split. If a parallel content line feature is found, the content is also split and each section will be contained by the closest container feature. If the content line is not parallel, the content will be contained by the container feature that is closest to it.  </bullet_item><para/>
        ///     <bullet_item>Unchecked—The container's content will not be split if the container feature is split. If a parallel content line feature is found, the content will be contained by both sections of the container feature. If the content line is not parallel, the content will be contained by the container feature that is closest to it. This is the default.  </bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para><xdoc>
        /// <para>指定在拆分容器功能时是否拆分容器的关联内容。仅当关联角色为容器时，此参数才可用，并且仅适用于线要素。
        ///   <bulletList>
        ///     <bullet_item>选中 - 如果拆分容器功能，则容器的内容将被拆分。如果找到平行内容行要素，则内容也会被拆分，并且每个部分都将包含在最接近的容器要素中。如果内容行不平行，则内容将由最接近它的容器要素包含。 </bullet_item><para/>
        ///     <bullet_item>未选中 - 如果拆分容器要素，则不会拆分容器的内容。如果找到并行内容行要素，则该内容将包含在容器要素的两个部分中。如果内容行不平行，则内容将由最接近它的容器要素包含。这是默认设置。 </bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Split Content")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _split_content_value _split_content { get; set; } = _split_content_value._false;

        public enum _split_content_value
        {
            /// <summary>
            /// <para>SPLIT</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("SPLIT")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>DO_NOT_SPLIT</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("DO_NOT_SPLIT")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Updated Utility Network</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Updated Utility Network")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _out_utility_network { get; set; }


        public SetAssociationRole SetEnv()
        {
            base.SetEnv();
            return this;
        }

    }

}